<%@ page language="java" contentType="text/html; charset=UTF8" pageEncoding="UTF8"%>
<form action="#" id="edit-form">
<input type="hidden" name="id" value="${user.id }" />
<table class="table">
	<tr>
		<td>用户名：</td>
		<td>
			<input type="text" name="username" value="${user.username }" />
		</td>
		<td>密码：</td>
		<td>
			<input type="text" name="password" value="${user.password }" />
		</td>
	</tr>
	<tr>
		<td>真实姓名：</td>
		<td>
			<input type="text" name="realname" value="${user.realname }" />
		</td>
		<td>电话：</td>
		<td>
			<input type="text" name="phone" value="${user.phone }" />
		</td>
	</tr>
	<tr>
		<td>性别：</td>
		<td>
			<input type="radio" name="sex" value="男"  />&nbsp;男
			&nbsp;&nbsp;&nbsp;
			<input type="radio" name="sex" value="女"  />&nbsp;女
		</td>
		<td>地址：</td>
		<td>
			<input type="text" name="addr" value="${user.addr }" />
		</td>
	</tr>
	<tr>
		<td colspan="4" align="center">
			<a href="javascript:void(0)" class="btn btn-primary  " onclick="update()" >保存</a>
			<a href="javascript:void(0)" class="btn btn-default " onclick="closeModal()">取消</a>
		</td>
	</tr>
</table>
</form>
<script>
$(function() {
	var sex = "${user.sex}";
	$("#edit-form input[value="+sex+"]").prop("checked", "checked");
})
</script>
